package servlet;

import bean.load;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "Cancel2", value = "/Cancel2")
public class Cancel2 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //撤销账户，需要输入正确的账户号和密码
        String ur1=request.getParameter("ur1");
        load ld = new load();
        String SQL;
        SQL="delete from reg where id='"+ur1+"'";
        ld.opert(SQL);
        response.sendRedirect("/HospitalAppointmentReg_Sys_war_exploded/jsp/table9.jsp");//页面跳转
    }
}
